package com.duoketech.model.distribute;
import com.duoketech.model.AbstractModel;
public class FoodDistribute extends AbstractModel<FoodDistribute>{
    public static final FoodDistribute dao = new FoodDistribute();

    public static final String ID = "id";//
    public static final String NAME = "name";//外卖订货人
    public static final String ITEM = "item";//外卖点餐内容
    public static final String MOBILE = "mobile";//外卖订货人电话
    public static final String SEND_ID = "send_id";//外卖送货人
    public static final String ADDRESS = "address";//外卖送货地址
    public static final String STATUS = "status";//
    public static final String CREATE_TIME = "create_time";//
    public static final String MODIFY_TIME = "modify_time";//

    public static final int STATUS_SENDING = 1;//等待配送
    public static final int STATUS_SENDING_SUCCESS = 2;//成功送达
    public static final int STATUS_SENDING_CANCLE = 3;//取消配送


    @Override
    public String tableName() {
        return "t_food_distribute";
    }

    @Override
    public String status() {
        String result="";
        if(getInt(STATUS)==STATUS_NORMAL){
            result="等待配送";
        }else if(getInt(STATUS)==STATUS_SENDING){
            result="正在配送";
        }else if(getInt(STATUS)==STATUS_SENDING_SUCCESS){
            result="成功送达";
        }else if(getInt(STATUS)==STATUS_SENDING_CANCLE){
            result="取消配送";
        }
        return result;
    }
}